package com.sinopec.basemodule.model;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.Nullable;

/**
 * 类描述：上传图片model <br/>
 * 创建人：lwj<br/>
 * 创建时间：2019/4/18 19:37 <br/>
 */
public class UploadImageModel implements Parcelable, Cloneable {
    /**
     * 图片Id
     */
    private String id = "";
    /**
     * 相对路径（真实路径）
     */
    private String relativePath = "";
    /**
     * 全路径
     */
    private String src = "";


    /**
     * create by lwj at 2023/5/15
     * 1 无法识别 2 识别不通过 3 识别通过
     */
    @Nullable
    private String ocrStatue = null;

    @Nullable
    public String getOcrStatue() {
        return ocrStatue;
    }

    public void setOcrStatue(@Nullable String ocrStatue) {
        this.ocrStatue = ocrStatue;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getRelativePath() {
        return relativePath;
    }

    public void setRelativePath(String relativePath) {
        this.relativePath = relativePath;
    }

    public String getSrc() {
        return src;
    }

    public void setSrc(String src) {
        this.src = src;
    }

    @Nullable
    @Override
    public UploadImageModel clone() {
        UploadImageModel clone = null;
        try {
            clone = (UploadImageModel) super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return clone;
    }

    ////////////////////////////////////////////////////

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.relativePath);
        dest.writeString(this.src);
        dest.writeString(this.ocrStatue);
    }

    public void readFromParcel(Parcel source) {
        this.id = source.readString();
        this.relativePath = source.readString();
        this.src = source.readString();
        this.ocrStatue = source.readString();
    }

    public UploadImageModel() {
    }

    protected UploadImageModel(Parcel in) {
        this.id = in.readString();
        this.relativePath = in.readString();
        this.src = in.readString();
        this.ocrStatue = in.readString();
    }

    public static final Creator<UploadImageModel> CREATOR = new Creator<UploadImageModel>() {
        @Override
        public UploadImageModel createFromParcel(Parcel source) {
            return new UploadImageModel(source);
        }

        @Override
        public UploadImageModel[] newArray(int size) {
            return new UploadImageModel[size];
        }
    };
}
